import { RouteRecordRaw, createWebHistory, createRouter } from "vue-router";

const routes : Array<RouteRecordRaw> = [
	
	{
		path: '/',
		name:'Index',
		component: () => import('../views/index/index.vue'),  // 首页组件
		beforeEnter:(to,from,next)=>{
			window.document.body.style.backgroundColor = "#fff";
			next();
		}
		

	},
	{
		path: '/ozonizer',
		name:'Ozonizer',
		component: () => import('../views/ozonizer/ozonizer.vue'),  // 臭氧页面
		beforeEnter:(to,from,next)=>{
			window.document.body.style.backgroundColor = "#3e8fba";
			next();
		}
		
	
	}
	
	
]

const router = createRouter({
	history: createWebHistory(), // 路由类型
	routes // short for `routes: routes`
})




export default router


